public class Test {
    //函数的调用需要满足类型和参数个数都要匹配。
    public static int sum(int a,int b) {
        return a+b;
    }
    public static int sum(int a,int b,int c) {
        return a+b;
    }
    public static double sum(int a,double b,int c) {
        return a+b;
    }
    public static double sum(double b,int c,int a) {
        return a+b;
    }
    public static double sum(double a,double b) {
        return a+b;
    }
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        int ret = sum(a,b);
        System.out.println(ret);
        double d1 = 12.3;
        double d2 = 12.5;
        double ret2 = sum(d1,d2);
        System.out.println(ret2);

    }
}
